<include file="Public:header" />
<!-- main content start-->
<div class="main-content" >

<!-- header section start-->
<div class="header-section">
    <!--toggle button start-->
    <a class="toggle-btn"><i class="fa fa-bars"></i></a>
    <!--toggle button end-->
    <!--search start-->
    <form class="searchform" method="post">
        <input type="text" class="form-control" name="search" placeholder="客户姓名" value="{$search}"/>
        <span class="input-group-btn" style="float:left;line-height: 50px;">
            <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
        </span>
    </form>
    <!--search end-->
    <!--notification menu start -->
    <div class="menu-right">
        <ul class="notification-menu">
            <li>
                <a href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                    <img src="__IMG__/photos/user-avatar.png" alt="" />
                    {$shopname}
                    <span class="caret"></span>
                </a>
                <ul class="dropdown-menu dropdown-menu-usermenu pull-right">
                    <li><a href="{:U('Shopadmin/Login/info')}"><i class="fa fa-user"></i>  个人信息</a></li>
                    <li><a href="{:U('Shopadmin/Login/changePwd')}"><i class="fa fa-cog"></i>  修改密码</a></li>
                    <li><a href="{:U('Shopadmin/Login/logout')}"><i class="fa fa-cog"></i>  退出登录</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <!--notification menu end -->
</div>
<!-- header section end-->
<!-- page heading start-->
<div class="page-heading">
    <h3>
        工单管理
    </h3>
    <ul class="breadcrumb">
        <li>
            <a href="#">首页</a>
        </li>
        <li> 工单管理 </li>
        <li class="active"> 工单列表 </li>
    </ul>
</div>
<!-- page heading end-->

<!--body wrapper start-->
<div class="wrapper">
    <section class="panel">
        <div class="panel-body">
            <section id="unseen">
                <table class="table table-bordered table-striped table-condensed">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>员工</th>
                        <th>客户</th>
                        <th>手机号</th>
                        <th>地址</th>
                        <th>添加时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="list" id="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.member_name}</td>

                            <td>{$vo.cus_name}</td>
                            <td>{$vo.cus_phone}</td>
                            <td>{$vo.cus_address}</td>
                            <td>
                                <empty name="vo.add_time">
                                    -
                                    <else/>
                                    {$vo.add_time|date="Y-m-d H:i:s",###}
                                </empty>
                            </td>
                            <td>
                                <a class="btn btn-xs btn-info" href="{:U('Shopadmin/WorkOrder/update',array('id'=>$vo['id']))}"><i class="fa fa-edit"></i>修改</a>
                                <a class="btn btn-xs btn-warning userDelete" onclick="del({$vo.id})"><i class="fa fa-trash-o"></i>删除</a>
                            </td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
                <div class="row">
                    <div class="col-lg-12">
                        <div class="dataTables_paginate paging_bootstrap pagination">
                            {$pages}
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<!--body wrapper end-->
<!-- main content end-->
    <script>
        function del(id){
            if(confirm("确认删除")){
                var url="{:U('Shopadmin/WorkOrder/delete')}";
                $.post(url,{id:id},function(res){
                    if(res.code==200){
                        toast(res.msg,true);
                        location.reload()
                    }else{
                        toast(res.msg,false);
                    }
                });
                return false;
            }else{
                return false;
            }
        }
    </script>
<include file="Public:footer" />